package com.huizluo.module4.chatroom;

import java.io.Serializable;
import java.util.Arrays;

public class Message implements Serializable {
    private int type;//0表示字符消息，1表示文件

    public Integer getUserID() {
        return userID;
    }

    public void setUserID(Integer userID) {
        this.userID = userID;
    }

    private Integer userID;

    public Message(int type, byte[] data) {
        this.type = type;
        this.data = data;
    }

    public int getType() {
        return type;
    }

    public byte[] getData() {
        return data;
    }

    private byte[] data;

    @Override
    public String toString() {
        return "Message{" +
                "type=" + type +
                ", data=" + Arrays.toString(data) +
                '}';
    }
}
